<template>
<div class="container-page">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[20, 40, 60,80, 100]"
      :page-size="10"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>  
</div>
  
</template>

<script>
export default {
    props:['total'],
    methods: {
      handleSizeChange(val) {
        // console.log(`每页 ${val} 条`);
        this.$emit('SizeChange',val)
      },
      handleCurrentChange(val) {
        // console.log(`当前页: ${val}`);
         this.$emit('CurrentChange',val)
      }
    },
    data() {
      return {
        currentPage:1
      };
    }

}
</script>

<style lang="less" scoped>
.container-page{
    padding: 0 40px 20px 40px;
    text-align: right;
}

</style>